var express = require('express');
const PropController = require('../../controllers/admin/PropController');
var PropRouter = express.Router();
//图片上传
const multer = require("multer")
const upload = multer({dest:"public/avataruploads/"})
// 朝这个路径发送请求  就会进UserController方法

PropRouter.post("/adminapi/prop/add",upload.single("file"),PropController.add)
PropRouter.get("/adminapi/prop/list",PropController.getList)
PropRouter.delete("/adminapi/prop/list/:id",PropController.delList)
PropRouter.get("/adminapi/prop/list/:id",PropController.getList)
PropRouter.put("/adminapi/prop/list/:id",PropController.putList)

PropRouter.post("/adminapi/prop/addaccount",PropController.addaccount)
PropRouter.get("/adminapi/prop/getaccount",PropController.getaccount)
PropRouter.get("/adminapi/prop/getaccount/:id",PropController.getaccount)
PropRouter.put("/adminapi/prop/putaccount/:id",PropController.putaccount)
PropRouter.delete("/adminapi/prop/delaccount/:id",PropController.delaccount)


 
module.exports = PropRouter;

